home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / ttedit / cd_find.frm < prev    next >
Text File  |  1994-11-28  |  4KB  |  142 lines

  1. VERSION 2.00
  2. Begin Form frmFind 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Find"
  6.    ClientHeight    =   1560
  7.    ClientLeft      =   1080
  8.    ClientTop       =   5955
  9.    ClientWidth     =   6225
  10.    Height          =   1965
  11.    Left            =   1020
  12.    ScaleHeight     =   104
  13.    ScaleMode       =   3  'Pixel
  14.    ScaleWidth      =   415
  15.    Top             =   5610
  16.    Width           =   6345
  17.    Begin OptionButton optUp 
  18.       BackColor       =   &H00C0C0C0&
  19.       Caption         =   "&Up"
  20.       Height          =   195
  21.       Left            =   3000
  22.       TabIndex        =   7
  23.       Top             =   960
  24.       Width           =   555
  25.    End
  26.    Begin OptionButton optDown 
  27.       BackColor       =   &H00C0C0C0&
  28.       Caption         =   "&Down"
  29.       Height          =   195
  30.       Left            =   3780
  31.       TabIndex        =   6
  32.       Top             =   960
  33.       Value           =   -1  'True
  34.       Width           =   795
  35.    End
  36.    Begin CheckBox chkMatchCase 
  37.       BackColor       =   &H00C0C0C0&
  38.       Caption         =   "Match &Case"
  39.       Height          =   315
  40.       Left            =   180
  41.       TabIndex        =   2
  42.       Top             =   1080
  43.       Width           =   2535
  44.    End
  45.    Begin CheckBox chkWholeWord 
  46.       BackColor       =   &H00C0C0C0&
  47.       Caption         =   "Match &Whole Word Only"
  48.       Height          =   315
  49.       Left            =   180
  50.       TabIndex        =   1
  51.       Top             =   660
  52.       Visible         =   0   'False
  53.       Width           =   2295
  54.    End
  55.    Begin CommandButton btnCancel 
  56.       Cancel          =   -1  'True
  57.       Caption         =   "Cancel"
  58.       Height          =   375
  59.       Left            =   4860
  60.       TabIndex        =   4
  61.       Top             =   600
  62.       Width           =   1275
  63.    End
  64.    Begin CommandButton btnFindNext 
  65.       Caption         =   "&Find Next"
  66.       Default         =   -1  'True
  67.       Height          =   375
  68.       Left            =   4860
  69.       TabIndex        =   3
  70.       Top             =   120
  71.       Width           =   1275
  72.    End
  73.    Begin TextBox txtSearch 
  74.       Height          =   315
  75.       Left            =   1320
  76.       TabIndex        =   0
  77.       Top             =   180
  78.       Width           =   3375
  79.    End
  80.    Begin Label lblDirection 
  81.       AutoSize        =   -1  'True
  82.       BackColor       =   &H00C0C0C0&
  83.       Caption         =   " &Direction: "
  84.       Height          =   195
  85.       Left            =   3000
  86.       TabIndex        =   8
  87.       Top             =   660
  88.       Width           =   960
  89.    End
  90.    Begin Label Label1 
  91.       BackColor       =   &H00C0C0C0&
  92.       Caption         =   "Fi&nd What:"
  93.       Height          =   375
  94.       Left            =   180
  95.       TabIndex        =   5
  96.       Top             =   240
  97.       Width           =   975
  98.    End
  99. End
  100. Option Explicit
  101. Dim OriginalParenthWnd As Integer
  102.  
  103. Sub btnCancel_Click ()
  104.    Hide
  105. End Sub
  106.  
  107. Sub btnFindNext_Click ()
  108.     Call FindNextText(CStr(txtSearch), CInt(optDown), CInt(chkMatchCase))
  109. End Sub
  110.  
  111. Sub Form_Activate ()
  112.     txtSearch.SelStart = 0
  113.     txtSearch.SelLength = Len(txtSearch)
  114.     txtSearch.SetFocus
  115. End Sub
  116.  
  117. '
  118. '  By calling the API this form will minimize and restore with the main MDI
  119. '
  120. Sub Form_Load ()
  121.     OriginalParenthWnd = SetWindowWord(Me.hWnd, GWW_HWNDPARENT, MDI.hWnd)
  122. End Sub
  123.  
  124. Sub Form_Paint ()
  125.     Call Raiseform(Me)
  126.     Call Indent(txtSearch)
  127.     Call Frame(50, 190, 42, 124, lblDirection)
  128. End Sub
  129.  
  130. '
  131. ' Reset the form back to the way it was
  132. '
  133. Sub Form_Unload (Cancel As Integer)
  134.     If SetWindowWord(Me.hWnd, GWW_HWNDPARENT, OriginalParenthWnd) Then
  135.     End If
  136. End Sub
  137.  
  138. Sub Label1_Click ()
  139.    txtSearch.SetFocus
  140. End Sub
  141.  
  142.